package com.jiashihui.schema_lgorithm.spring;

import com.jiashihui.schema_lgorithm.spring.bean.CollectProperty;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author jiashihui
 * @describe: DI(依赖注入）
 * @date 2019/03/20
 */
public class InjectionBeanProperty {
    @Test
    public void getBean1() throws Exception {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring/applicationContext.xml");
        CollectProperty bean = context.getBean("collectionProperty", CollectProperty.class);
        System.out.println(bean.toString());
    }
}
